﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Checkout.aspx.cs" Inherits="Checkout" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

    <table align="center" border="1" style="width: 95%;">
        <tr>
            <td colspan="4" style="text-align: center; height: 28px; color: #0000FF">
                <b style="font-size: large; color: #FF0000">Chi tiết hóa đơn</b></td>
        </tr>
        <tr>
            <td style="text-align: center; color: #0000FF; width: 210px">
                <b>Tên sản phẩm</b></td>
            <td style="text-align: center; color: #0000FF; width: 95px;">
                <b>Số lượng</b></td>
            <td style="text-align: center">
                <b style="color: #0000FF">Đơn giá</b></td>
            <td style="text-align: center">
                <b style="color: #0000FF">Thành tiền </b>
            </td>
        </tr>
        <asp:Repeater ID="CartCheckout" runat="server" >
            <ItemTemplate>
                <tr style="color: #000000">
                    <td style="width: 210px; text-align: center">
                        <b><%# Eval("name") %></b>
                    </td>
                    <td style="text-align: center">
                        <b>
                        <asp:Label ID="Label1" runat="server" Text='<%# Session["item" + Eval("id")]%>'></asp:Label>
                        </b>
                    </td>
                    <td style="text-align: center">
                        <b><%# Eval("price", "{0:0,0}") %>VNĐ</b></td>
                    <td style="text-align: center">
                        <b><%# string.Format("{0:0,0}",getSumCash(Eval("id").ToString())) %>VNĐ</b></td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <tr>
            <td style="width: 210px; text-align: right; height: 22px">
                <b style="color: #0000FF">Tổng tiền =&nbsp;&nbsp; </b>
            </td>
            <td colspan="3" style="height: 22px; text-align: center;">
                <b>
                <span class="style1"><% Response.Write(string.Format("{0:0,0}", getTotalCash())); %> VNĐ</span></b>
                </td>
        </tr>
    </table>
    <table align="center" style="width: 95%;">
        <tr>
            <td colspan="2" style="text-align: center">
                <b style="font-size: large; color: #FF0000">Thông tin người đặt hàng</b></td>
        </tr>
        <tr>
            <td style="width: 188px; color: #0000FF">
                <b>Họ tên</b></td>
            <td>
                <asp:Label ID="lbName" runat="server" style="color: #000000; font-weight: 700"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 188px; color: #0000FF; height: 20px;">
                <b>Email</b></td>
            <td style="height: 20px">
                <asp:Label ID="lbEmail" runat="server" style="color: #000000; font-weight: 700"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 188px; color: #0000FF">
                <b>Số điện thoại</b></td>
            <td>
                <asp:Label ID="lbPhone" runat="server" style="color: #000000; font-weight: 700"></asp:Label>
            </td>
        </tr>
        <tr>
            <td style="width: 188px; color: #0000FF">
                <b>Địa chỉ</b></td>
            <td>
                <asp:Label ID="lbAddress" runat="server" 
                    style="color: #000000; font-weight: 700"></asp:Label>
            </td>
        </tr>
    </table>
        
    <table align="center" style="width: 95%;">
        <tr>
            <td colspan="2" style="text-align: center">
                <b style="font-size: large; color: #FF0000">Thông tin giao hàng</b></td>
        </tr>
        <tr>
            <td style="color: #0000FF" colspan="2">
                <asp:Button ID="btnCopy" runat="server" onclick="btnCopy_Click" 
                    Text="Nhập người nhận mới" style="text-align: center" />
            </td>
        </tr>
        <tr>
            <td style="width: 188px; color: #0000FF">
                <b>Họ tên người nhận</b></td>
            <td>
                <asp:TextBox ID="txtName" runat="server" Width="259px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 188px; color: #0000FF">
                <b>Email</b></td>
            <td>
                <asp:TextBox ID="txtEmail" runat="server" Width="259px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 188px; color: #0000FF">
                <b>Số điện thoại</b></td>
            <td>
                <asp:TextBox ID="txtPhoneNumber" runat="server" Width="259px" Height="22px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 188px; color: #0000FF">
                <b>Địa chỉ</b></td>
            <td>
                <asp:TextBox ID="txtAddress" runat="server" Width="259px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="width: 188px; color: #0000FF">
                <b>Phương thức thanh toán</b></td>
            <td>
                <asp:DropDownList ID="ComboListPayment" runat="server" Height="18px" 
                    Width="266px">
                    <asp:ListItem>Tiền mặt</asp:ListItem>
                    <asp:ListItem>Thẻ Visa/Master</asp:ListItem>
                    <asp:ListItem>Paypal/AlertPay</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
    </table>
    <p style="text-align: center" >
    <a href="Default.aspx"><input id="Button1" style="height: 38px" type="button" 
                    value="Về trang chủ" /></a>&nbsp;
        <asp:Button ID="btnDatHang" runat="server" Height="38px" 
            onclick="btnDatHang_Click" style="margin-top: 0px" Text="Đặt hàng" />
    </p>
     </asp:Content>

